import Vue from 'vue'
import VueRouter from 'vue-router'
import DengLu from '../views/DengLu.vue'
import ShouYe from '../views/ShouYe.vue'
import WenDa from  '../views/WenDa.vue'
import ShiPing from  '../views/ShiPing.vue'
import WoDe from  '../views/WoDe.vue'
import MyHome from '../views/MyHome'

Vue.use(VueRouter)

const routes = [
  //一级路由
  // { path: '/', redirect: '/ShouYe' },
  { path: '/DengLu', name: 'DengLu',component: DengLu },
  { path: '/', name: 'ShouYe',component: MyHome , redirect:'ShouYe',
    children:[
        {path: 'ShouYe', name: 'ShouYe',component: ShouYe },
        { path: 'WenDa', name: 'WenDa',component: WenDa },
        { path: 'ShiPing', name: 'ShiPing',component: ShiPing },
        { path: 'WoDe', name: 'WoDe',component: WoDe },
    ]
  },

 
]

const router = new VueRouter({
  routes
})

export default router
